const { ccclass, property } = cc._decorator;

@ccclass
export default class AdjustRichText extends cc.Component {
    @property
    max_width = 354;

    onEnable() {
        this.adjustProTipSize();
    }

    adjustProTipSize() {
        var e = this.node.width;
        var t = this.max_width;
        var a = 1;
        if (e >= t) {
            a = t / e;
        }
        this.node.scale = a;
    }
}
